const path = require('path')
const html = require('html-webpack-plugin')
module.exports = {
  mode: 'production',
  entry: {
    entry1: './src/index.js',
    entry2: './src/main.js'
  },
  output: {
    path: path.resolve(__dirname, '../dist2'),
    filename: '[name].[contenthash:8].js'
  },
  plugins: [
    new html({
      template: './public/index.html',
      filename: 'index.html',
      chunks: ['entry1']
    }),
    new html({
      template: './public/main.html',
      filename: 'main.html',
      chunks: ['entry2']
    })
  ]
}